import service from '@/utils/request'

// 获取用户信息详情
export const getUserInfoRequest = () => {
  return service({
    method: 'get',
    url: '/personCenter/getPersonBasicInfo',
  })
}

// 修改用户信息详情
export const changeUserInfoRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/modifyPersonBasicInfo',
    data
  })
}

// 修改用户头像
export const updataUserProtoRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/uploadUserPhoto',
    data
  })
}

// 安全设置页面获取验证码
export const getVerificationCodeRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/getPhoneValidCode',
    data
  })
}

// 修改密码
export const updataPasswordRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/modifyPassword',
    data
  })
}

// 验证码校验
export const regVerificationCodeRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/checkPhoneValidCode',
    data
  })
}

// 修改手机号
export const updataPhoneRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/modifyPhone',
    data
  })
}

// 获取邮箱验证码
export const getEamilCodeForEmailRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/sendMailValidCode',
    data
  })
}

// 绑定邮箱
export const bindingEmailRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/bindEmail',
    data
  })
}

// 绑定微信
export const bindingWeChatRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/bindWeixin',
    data
  })
}

// 解绑微信
export const unbindingWeChatRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/unbindWeixin',
    data
  })
}

// 查询绘图页面列表
export const getDrawPageListRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/getDrawPageList',
    data
  })
}

// 新增目录
export const addDirectoryRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/addDirectory',
    data
  })
}

// 修改目录
export const modifyDirectoryRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/modifyDirectory',
    data
  })
}

// 删除目录
export const deleteDirectoryRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/deleteDirectory',
    data
  })
}

// 新增菜单
export const addMenuRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/addMenu',
    data
  })
}

// 修改菜单
export const modifyMenuRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/modifyMenu',
    data
  })
}

// 删除菜单
export const deleteMenuRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/deleteMenu',
    data
  })
}

// 保存菜单配置
export const saveMenuSettingRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/saveMenuSetting',
    data
  })
}

// 发布撤回
export const changeMenuStatusRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/changeMenuStatus',
    data
  })
}

// 查询菜单配置
export const getMenuSettingRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/getMenuSetting',
    data
  })
}

// 分页查询个人任务列表
export const pageSearchPersonTaskRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/pageSearchPersonTask',
    data
  })
}

// 查看任务路径
export const viewTaskPathRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/viewTaskPath',
    data
  })
}

// 重新运行任务
export const reRunDrawTaskRequest = data => {
  return service({
    method: 'post',
    url: '/taskManage/reRunDrawTask',
    data
  })
}

//获取云图发布可选项
export const getCloudPicturePublishChooseOptionRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/getCloudPicturePublishChooseOption',
    data
  })
}

//更新云图发布状态
export const updateCloudPicturePublishStatusRequest = data => {
  return service({
    method: 'post',
    url: '/personCenter/updateCloudPicturePublishStatus',
    data
  })
}